
#include "proj.h"

extern void Fu_Dummy_initialize();
extern void Fu_Foc_initialize();
extern void Fu_SensAvrgFast_initialize();
extern void PwmOutput_initalize();
extern void PeriphOut_initialize();
extern void Fu_Dummy_20ms_initialize();
extern void CanOut_initialize();

//extern void Fu_RotAngObs_initialize();
extern void Fu_MoCoord_initialize();
//extern void Fu_RotAngObsPLL_initialize();
extern void Fu_RotSpd_initialize();

extern void Fu_CenCoord_initialize();

extern void Fu_Dummy_step();
extern void Fu_SensAvrgFast_step();
extern void Fu_Foc_step();
extern void PwmOutput_step();

//extern void Fu_RotAngObsPLL_step();

extern void Fu_Dummy_20ms_step();
extern void PeriphOut_step();
extern void CanOutFast_step();
extern void CanOut_step();
//extern void Fu_RotAngObs_step();
extern void Fu_MoCoord_step();
extern void Fu_RotSpd_step();
extern void Fu_CenCoord_step();

extern void HallIn_initialize();
extern void HallIn_step();

extern void Fu_HallSensCalc_initialize();
extern void Fu_HallSensCalc_step();

void OsUltraFastTasksSched_init()
{
	HallIn_initialize();
	Fu_HallSensCalc_initialize();
}

void OsUltraFastTasksSched()
{
	HallIn_step();
	Fu_HallSensCalc_step();
}

void OsFastTasksSched_init()
{
	// Fu_Dummy_initialize();


	Fu_SensAvrgFast_initialize();

	//Fu_RotAngObs_initialize();
	Fu_RotSpd_initialize();
	Fu_Foc_initialize();
	//Fu_RotAngObsPLL_initialize();


	PwmOutput_initalize();
}


void OsFastTasksSched()
{
	// Fu_Dummy_step();

	Fu_SensAvrgFast_step();

	Fu_RotSpd_step();
	// Fu_RotAngObs_step();
	Fu_Foc_step();
	// Fu_RotAngObsPLL_step();

	PwmOutput_step();
	CanOutFast_step();
}



void OsTasksSched_init()
{
	Fu_Dummy_20ms_initialize();
	Fu_CenCoord_initialize();
	Fu_MoCoord_initialize();
	PeriphOut_initialize();
	CanOut_initialize();
}



void OsTasksSched()
{
	Fu_Dummy_20ms_step();
	Fu_CenCoord_step();
	Fu_MoCoord_step();
	PeriphOut_step();
	CanOut_step();
}
